﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YJ_Code.Entities.Topic;
using YJ_Core.Entities.Utils;

namespace YJ_App.Admin_System.Dtos
{
    /// <summary>
    /// 话题管理Dto
    /// </summary>
    public class TopicAdminDto
    {
        /// <summary>
        /// 话题列表-输入
        /// </summary>
        public class SelectTopicListInput : InputPageBase
        {
            /// <summary>
            /// 关键字
            /// </summary>
            public string KeyWord { get; set; }

            /// <summary>
            /// 内容描述
            /// </summary>
            public string Content { get; set; }

            /// <summary>
            /// 审核状态：<br/>
            /// 0：待审核 <br/>
            /// 1：审核通过<br/>
            /// 2：审核不通过
            /// </summary>
            public int? CheckStatus { get; set; }

            /// <summary>
            /// 开始时间
            /// </summary>
            public DateTime? StartDate { get; set; }

            /// <summary>
            /// 结束时间
            /// </summary>
            public DateTime? EndDate { get; set; }
        }

        /// <summary>
        /// 话题列表-输出
        /// </summary>
        public class SelectTopicListOutput
        {
            /// <summary>
            /// 话题id
            /// </summary>
            public string TopicId { get; set; }

            /// <summary>
            /// 用户id
            /// </summary>
            public string UserId { get; set; }

            /// <summary>
            /// 标题
            /// </summary>
            public string Title { get; set; }

            /// <summary>
            /// 内容描述
            /// </summary>
            public string Content { get; set; }

            /// <summary>
            /// 经度
            /// </summary>
            public double Longitude { get; set; }

            /// <summary>
            /// 纬度
            /// </summary>
            public double Latitude { get; set; }

            /// <summary>
            /// 地点名称
            /// </summary>
            public string LocationName { get; set; }

            /// <summary>
            /// 邮箱
            /// </summary>
            public string Email { get; set; }

            /// <summary>
            /// 详细地址
            /// </summary>
            public string Address { get; set; }

            /// <summary>
            /// 话题状态：
            /// 0:草稿 1:已发布
            /// </summary>
            public int Status { get; set; }

            /// <summary>
            /// 审核状态：<br/>
            /// 0：待审核 <br/>
            /// 1：审核通过<br/>
            /// 2：审核不通过
            /// </summary>
            public int CheckStatus { get; set; }

            /// <summary>
            /// 创建时间
            /// </summary>
            public DateTime? CreateTime { get; set; }

            /// <summary>
            /// 创建人
            /// </summary>
            public string CreateMan { get; set; }

            /// <summary>
            /// 图片-数组
            /// </summary>
            public List<string> Images { get; set; }

            /// <summary>
            /// 点赞数量
            /// </summary>
            public long LikeCount { get; set; }

            /// <summary>
            /// 收藏数量
            /// </summary>
            public long CollectCount { get; set; }

            /// <summary>
            /// 浏览数量
            /// </summary>
            public long SkimThroughCount { get; set; }

            /// <summary>
            /// 分享数量
            /// </summary>
            public long ShareCount { get; set; }
        }

        /// <summary>
        /// 话题列表-输出
        /// </summary>
        public class SelectTopicListResp : ResponseStatus
        {
            public List<SelectTopicListOutput> List { get; set; }

            public int Total { get; set; }
        }

        /// <summary>
        /// 审核话题
        /// </summary>
        public class CheckTopicInput
        {
            /// <summary>
            /// 话题id
            /// </summary>
            public string TopicId { get; set; }

            /// <summary>
            /// 用户id
            /// </summary>
            public string UserId { get; set; }

            /// <summary>
            /// 审核状态：<br/>
            /// 0：待审核 <br/>
            /// 1：审核通过<br/>
            /// 2：审核不通过
            /// </summary>
            public int? CheckStatus { get; set; }

            /// <summary>
            /// 审核驳回理由
            /// </summary>
            public string RejectReason { get; set; }
        }

        /// <summary>
        /// 获取话题详情-输入
        /// </summary>
        public class SelectTopicDetailInput
        {
            /// <summary>
            /// 话题id
            /// </summary>
            public string TopicId { get; set; }
        }

        public class SelectTopicDetailOutput
        {
            /// <summary>
            /// 话题id
            /// </summary>
            public string TopicId { get; set; }

            /// <summary>
            /// 用户id
            /// </summary>
            public string UserId { get; set; }

            /// <summary>
            /// 标题
            /// </summary>
            public string Title { get; set; }

            /// <summary>
            /// 内容描述
            /// </summary>
            public string Content { get; set; }

            /// <summary>
            /// 标签
            /// </summary>
            public string Tags { get; set; }

            /// <summary>
            /// 经度
            /// </summary>
            [Column(TypeName = "decimal(10,6)")]
            public double Longitude { get; set; }

            /// <summary>
            /// 纬度
            /// </summary>
            [Column(TypeName = "decimal(10,6)")]
            public double Latitude { get; set; }

            /// <summary>
            /// 地点名称
            /// </summary>
            public string LocationName { get; set; }

            /// <summary>
            /// 详细地址
            /// </summary>
            public string Address { get; set; }

            /// <summary>
            /// 话题状态：
            /// 0:草稿 1:已发布
            /// </summary>
            public int Status { get; set; }

            /// <summary>
            /// 审核状态：<br/>
            /// 0：待审核 <br/>
            /// 1：审核通过<br/>
            /// 2：审核不通过
            /// </summary>
            public int CheckStatus { get; set; }

            /// <summary>
            /// 审核驳回理由
            /// </summary>
            public string RejectReason { get; set; }

            /// <summary>
            /// 审核人
            /// </summary>
            public string CheckMan { get; set; }

            /// <summary>
            /// 审核时间
            /// </summary>
            public DateTime CheckTime { get; set; }

            /// <summary>
            /// 点赞数量
            /// </summary>
            public long LikeCount { get; set; }

            /// <summary>
            /// 图片-数组
            /// </summary>
            public List<string> Images { get; set; }

            /// <summary>
            /// 创建时间
            /// </summary>
            public DateTime? CreateTime { get; set; }

            /// <summary>
            /// 创建人
            /// </summary>
            public string CreateMan { get; set; }

            /// <summary>
            /// 邮箱
            /// </summary>
            public string Email { get; set; }
        }

        /// <summary>
        /// 获取话题详情-响应
        /// </summary>
        public class SelectTopicDetailResp : ResponseStatus
        {
            public SelectTopicDetailOutput TopicDetail { get; set; }

            public List<LogRecord> LogDetail { get; set; }
        }
    }
}
